#ifndef __SCHED_LOTTERY__
#define __SCHED_LOTTERY__

#include <vector>
#include <map>
#include "basesched.h"
#include <stdlib.h>
#include <iostream>

//using namespace std;


/*struct ticketsYpids{
	int ticket;
	int pid;
	bool block;
};*/


class SchedLottery : public SchedBase {
	public:
		SchedLottery(std::vector<int> argn);
		virtual void load(int pid);
		virtual void unblock(int pid);
		virtual int tick(const enum Motivo m);
		
	private:
		int quantum;
		int def_quantum;
		//int semilla;
		int siguiente();
		int cant_tickets;
		void compensationT();
		//std::vector<ticketsYpids> uploaded;
		//std::vector<ticketsYpids> ready;
		std::vector<int> ready;
		std::map<int, int> tickets;
		
	
	
};

#endif
